Skip to content

fix(examples): return the agent's protocol version from initialize - #205

Merged
PsiACE merged 1 commit into
agentclientprotocol:mainfrom
andreivince:fix-example-protocol-version
Nov 25, 2026
Merged

PsiACE merged 1 commit into
agentclientprotocol:mainfrom
andreivince:fix-example-protocol-version

Conversation

@andreivince

@andreivince andreivince commented Nov 21, 2026 •

Copy link
Copy Markdown
Contributor

Summary

examples/echo_agent.py and examples/http_server.py answer initialize with whatever protocolVersion the client sent, so a client asking for 65535 gets 65535 back. The spec says an agent that doesn't support the requested version must answer with the latest one it supports, and the docs suggest starting new agents from echo_agent.py.

Both now return PROTOCOL_VERSION, like examples/agent.py already does.

Related issues

No issue for this. The TCK cross-check lists it as the echo agent's known ACP-INIT-003 failure (cross-check/run.sh).

Testing

  • Called initialize with 1, 2 and 65535 on echo_agent.py (spawned like test_spawn_agent_process_roundtrip) and on the http_server.py app over HTTP and WebSocket. Main echoes the requested version; this branch answers 1.
  • make check and make test pass.

No new test, since the TCK already checks this rule against echo_agent.py.

Docs & screenshots

Only the two examples change. No docs page shows this initialize pattern.

Checklist

  • Conventional Commit title (e.g. feat:, fix:).
  • Tests cover the change or are not required (explain above).
  • Docs/examples updated when behaviour is user-facing.
  • Schema regenerations (make gen-all) are called out if applicable.

The echo agents returned whatever version the client asked for. The spec
says an agent that does not support the requested version must answer with
the latest version it supports, so return PROTOCOL_VERSION like
examples/agent.py does.
Copilot AI balanced review requested due to automatic review settings November 21, 2026 22:16

Copilot AI left a comment

Copy link
Copy Markdown

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Copilot was unable to review this pull request because the user who requested the review has insufficient remaining quota. Try requesting a review at a lower effort level.

An organization owner can choose the repository organization as the billing source for reviews requested by members with a paid Copilot license. Learn about Copilot code review billing.

@PsiACE
PsiACE merged commit 94c4988 into agentclientprotocol:main Nov 25, 2026
9 checks passed
@PsiACE

PsiACE commented Nov 25, 2026

Copy link
Copy Markdown
Member

thanks

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

3 participants